<section class="header clearfix">
  <div class="right-buttons">
    <div class="btn-group p-0 mr-10">
      {{#tooltip-element type="tooltip-basic" model=(t 'nav.group.none') tooltipTemplate='tooltip-static' aria-describedby="tooltip-base" tooltipFor="tooltipLink"}}
        {{#link-to (query-params group="none") classNames="btn btn-sm bg-default"}}<i class="icon icon-file"></i>{{/link-to}}
      {{/tooltip-element}}

      {{#tooltip-element type="tooltip-basic" model=(t 'nav.group.namespace') tooltipTemplate='tooltip-static' aria-describedby="tooltip-base" tooltipFor="tooltipLink"}}
        {{#link-to (query-params group="namespace") classNames="btn btn-sm bg-default"}}<i class="icon icon-list-nested"></i>{{/link-to}}
      {{/tooltip-element}}
    </div>

    <button class="btn btn-sm bg-default mr-10" disabled={{rbac-prevents resource="configmap" scope="project" permission="create"}} type="button" {{action 'importYaml'}}>{{t 'nav.containers.importCompose'}}</button>

    {{#link-to "authenticated.project.config-maps.new" classNames="btn btn-sm bg-primary" disabled=(rbac-prevents resource=resource scope="project" permission="create")}}{{t 'configMapsPage.index.linkTo'}}{{/link-to}}
  </div>

  <h1>{{t 'configMapsPage.index.header'}}</h1>
</section>

<section class="instances pt-5 pb-5">
  {{#sortable-table
    classNames="grid sortable-table"
    body=rows
    descending=descending
    groupByKey=groupTableBy
    groupByRef="namespace"
    sortBy=sortBy
    bulkActions=true
    headers=headers as |sortable kind row dt|}}
    {{#if (eq kind "row")}}
      {{config-map-row model=row dt=dt}}
    {{else if (eq kind "group")}}
      {{namespace-group model=row.ref noGroup="namespaceGroup.project" fullColspan=sortable.fullColspan}}
    {{else if (eq kind "nomatch")}}
      <tr><td colspan="{{sortable.fullColspan}}" class="text-center text-muted pt-20 pb-20">{{t 'configMapsPage.index.noMatch'}}</td></tr>
    {{else if (eq kind "norows")}}
      <tr><td colspan="{{sortable.fullColspan}}" class="text-center text-muted pt-20 pb-20">{{t 'configMapsPage.index.noData'}}</td></tr>
    {{/if}}
  {{/sortable-table}}
</section>